package com.woniuxy.car.boss.client;

import com.woniuxy.car.boss.param.power.BossAddPileParam;
import com.woniuxy.car.boss.param.power.BossAddStationParam;
import com.woniuxy.car.boss.param.power.BossUpdatePileParam;
import com.woniuxy.car.boss.param.power.BossUpdateStationParam;
import com.woniuxy.car.common.resultcode.Result;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

import javax.validation.constraints.NotNull;

@FeignClient(contextId = "powerBossClient",name="boss")
public interface PowerBossClient {

    /**
     * @Description //TODO 增加电站
     * @author js
     * @date 2022/11/26 15:17
     * @param
     * @return  Result
     **/
    @PostMapping("/addStation")
    public Result addStation(@RequestBody BossAddStationParam addStationParam);

    /**
     * @Description //TODO 更新电站信息
     * @author js
     * @date 2022/11/26 15:19
     * @param
     * @return  Result
     **/
    @PutMapping("/updateStation")
    public Result updateStation(@RequestBody BossUpdateStationParam updateStationParam);

    /**
     * @Description //TODO 删除电站
     * @author js
     * @date 2022/11/26 15:19
     * @param stationId
     * @return  Result
     **/
    @DeleteMapping("/delStation")
    public Result delStation(@RequestParam("stationId") @NotNull Integer stationId);

    /**
     * @Description //TODO 开放电站
     * @author js
     * @date 2022/11/27 17:49
     * @param stationId
     * @return  Result
     **/
    @GetMapping("/openStation")
    public Result openStation(@RequestParam("stationId") @NotNull Integer stationId);

    /**
     * @Description //TODO 关闭电站
     * @author js
     * @date 2022/11/27 17:49
     * @param stationId
     * @return  Result
     **/
    @GetMapping("/closeStation")
    public Result closeStation(@RequestParam("stationId") @NotNull Integer stationId);

    /**
     * @Description //TODO 添加电桩
     * @author js
     * @date 2022/11/26 16:27
     * @param addPileParam
     * @return  Result
     **/
    @PostMapping("/addPile")
    public Result addPile(@RequestBody BossAddPileParam addPileParam);

    /**
     * @Description //TODO 更新电桩信息
     * @author js
     * @date 2022/11/26 16:28
     * @param
     * @return
     **/
    @PutMapping("/updatePile")
    public Result updatePile(@RequestBody BossUpdatePileParam updatePileParam);

    /**
     * @Description //TODO 删除电桩
     * @author js
     * @date 2022/11/26 16:28
     * @param pileId
     * @return  Result
     **/
    @DeleteMapping("/delPile")
    public Result delPile(@RequestParam("pileId") @NotNull Integer pileId
            ,@RequestParam("stationId") @NotNull Integer stationId);

    /**
     * @Description //TODO 设置电桩为异常状态
     * @author js
     * @date 2022/11/27 17:51
     * @param pileId
     * @return  Result
     **/
    @GetMapping("/setPileAbnormal")
    public Result setPileAbnormal(@RequestParam("pileId") @NotNull Integer pileId);

    /**
     * @Description //TODO 设置电桩为正常状态,即空闲状态
     * @author js
     * @date 2022/11/27 17:51
     * @param pileId
     * @return  Result
     **/
    @GetMapping("/setPileFree")
    public Result setPileNormal(@RequestParam("pileId") @NotNull Integer pileId);

    /**
     * @Description //TODO 设置电桩为使用中,即USING
     * @author js
     * @date 2022/11/27 17:51
     * @param pileId
     * @return  Result
     **/
    @GetMapping("/setPileUsing")
    public Result setPileUsing(@RequestParam("pileId") @NotNull Integer pileId);
}
